$datestring = gmtime();
print "GMT date and time $datestring\n";

($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime();

printf("Time Format - HH:MM:SS\n");
printf("%02d:%02d:%02d", $hour, $min, $sec);

$epoc = time();
print "Number of seconds since Jan 1, 1970 - $epoc\n";  